package kioscodeal

class LoginTagLib {
  def loginControl = {
    if(session.user){
	  out << "<li class=\"dropdown user-dropdown\">"
	  out << "<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"fa fa-user\"></i> ${session.user.nombre}</a>"
	  out << "</li>"
    } else {
      //out << """[${link(action:"login", controller:"user"){"Login"}}]"""    
	  
	  
	    out << "<li>"
		out << "	  <a href=\"${createLink(action:'login', controller:'user')}\"><i class=\"fa fa-power-off\"></i> Login</a>"
		out << "</li>"
    }
  }
}
